#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
	int t;
	cin >> t;
	while (t--) {
		string s;
		cin >> s;
		int plus_index = s.find("+");
		int equals_index = s.find("=");
		int a = stoll(s.substr(0, plus_index));
		int b = stoll(s.substr(plus_index + 1, equals_index - plus_index - 1));
		int c = stoll(s.substr(equals_index + 1));
		if (a + b == c)
			cout << "Right!\n";
		else
			cout << "Wrong!\n";
	}
	return 0;
}
